package net.iiyasvn.data;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteDatabase.CursorFactory;
import android.database.sqlite.SQLiteOpenHelper;

public class SQLHelper extends SQLiteOpenHelper {
	private static final int VERSION = 1;

	private String create_index_table = "create table " + DB.INDEX_TABLE + "("
			+ DB.TID + " TEXT," + DB.CONTENT + " TEXT," + DB.TFACE + " TEXT,"
			+ DB.TFACE2 + " TEXT," + DB.MP3 + " TEXT," + DB.REPLY_COUNT
			+ " TEXT," + DB.LIKE_COUNT + " TEXT," + DB.FROM + " TEXT," + DB.ADDTIME
			+ " TEXT," + DB.UID + " TEXT," + DB.NICKNAME
			+ " TEXT," + DB.USERFACE + " TEXT," + DB.ISLIKE + " TEXT)";

	public SQLHelper(Context context, String name, CursorFactory factory,
			int version) {
		super(context, name, factory, version);
	}

	public SQLHelper(Context context, String name, int version) {
		super(context, name, null, version);
	}

	public SQLHelper(Context context, String name) {
		super(context, name, null, VERSION);
	}

	public SQLHelper(Context context) {
		super(context, DB.IIYADB, null, VERSION);
	}

	@Override
	public void onCreate(SQLiteDatabase db) {
		db.execSQL(create_index_table);
	}

	@Override
	public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {

	}
}
